package top.techqi.hamtools.ext

import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
import android.graphics.RectF

fun Rect.toRectF() = RectF(this)
fun RectF.toRect() = Rect(left.toInt(), top.toInt(), right.toInt(), bottom.toInt())

fun Point.toPointF() = PointF(this)
fun PointF.toPoint() = Point(x.toInt(), y.toInt())